package cn.springboot.erp.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 
 * @TableName purchase_orders
 */
@TableName(value ="purchase_orders")
@Data
public class PurchaseOrders implements Serializable {
    /**
     * 采购订单ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单编号
     */
    @TableField(value = "order_number")
    private String orderNumber;

    /**
     * 供应商名称
     */
    @TableField(value = "supplier_name")
    private String supplierName;

    /**
     * 商品名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 商品型号
     */
    @TableField(value = "version")
    private String version;

    /**
     * 商品颜色
     */
    @TableField(value = "color")
    private String color;

    /**
     * 采购数量
     */
    @TableField(value = "quantity")
    private Integer quantity;

    /**
     * 订单日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @TableField(value = "order_date")
    private Date orderDate;

    /**
     * 订单总金额
     */
    @TableField(value = "total_amount")
    private Double totalAmount;

    /**
     * 订单状态：默认0表示等待，1表示处理，2表示完成，3表示取消
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 订单备注
     */
    @TableField(value = "note")
    private String note;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}